A computer network is a collection of interconnected computing devices that can exchange data and share resources. In a packet-based network, the computing devices communicate data by dividing the data into small blocks called packets, which are individually routed across the network from a source device to a destination device. The destination device extracts the data from the packets and assembles the data into its original form. Dividing the data into packets enables the source device to resend only those individual packets that may he lost during transmission. The packets are transmitted between the source device and destination device using intermediate network devices, such as gateways, firewalls, switches and routers.
In order to improve the speed at which the network device forwards packets, a network device may use a flow cache that includes a minimal list of forwarding actions per flow. A forwarding subsystem of the network device continues to maintain full forwarding state. As such, the network device forwards a packet for a particular flow using the flow cache for actions that do not need the full forwarding state and forwards the packet for the particular flow using the forwarding subsystem for actions that need the full forwarding state. In this way, the network device may provide an efficient mechanism for forwarding packets for a flow without relying solely on a full forwarding state stored by a forwarding subsystem of the network device.